package com.cq.hd.product.mapper;

import com.cq.hd.product.api.dto.AvailableRedPacketDto;
import com.cq.hd.product.api.dto.MyPrizeRedPacketBillPageDto;
import com.cq.hd.product.api.vo.ActiveRedPacketBilListVo;
import com.cq.hd.product.api.dto.ActiveRedPacketBillPageDto;
import com.cq.hd.product.api.vo.ActiveRedPacketBillPageVo;
import com.cq.hd.product.api.vo.MyPrizeRedPacketBillPageVo;
import com.cq.hd.product.po.TbActiveRedPacketBillPo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 红包流水表 Mapper 接口
 * </p>
 *
 * @author mYunYu
 * @since 2023-11-23
 */
@Mapper
public interface TbActiveRedPacketBillMapper extends BaseMapper<TbActiveRedPacketBillPo> {

    List<ActiveRedPacketBillPageVo> listByDto(ActiveRedPacketBillPageDto activeRedPacketBillPageDto);

    List<MyPrizeRedPacketBillPageVo> pageMyPrizeRedPacket(MyPrizeRedPacketBillPageDto myPrizeRedPacketBillPageDto);

    int updateUseState(ActiveRedPacketBillPageVo activeRedPacketBillPageVo);

    int updateUnUseState(ActiveRedPacketBillPageVo activeRedPacketBillPageVo);

    List<ActiveRedPacketBillPageVo> listActiveRedPacketBillByRedPacketIds(@Param("redPacketIds") List<Long> redPacketIds);

    List<ActiveRedPacketBillPageVo> listUsedByBusinessId(@Param("businessId") Long businessId, @Param("activeRedPacketStates") List<Integer> activeRedPacketStates);

    List<ActiveRedPacketBilListVo> activeAvailableList(AvailableRedPacketDto availableRedPacketDto);
}
